<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>Django+Layui【旗舰版】敏捷开发框架</title>
    <link href="/static/assets/images/favicon.ico" rel="icon">
    <link rel="stylesheet" href="/static/assets/libs/layui/css/layui.css"/>
    <link rel="stylesheet" href="/static/assets/module/admin.css?v=318"/>
    <link rel="stylesheet" href="/static/assets/css/theme-all.css?v=318"/>
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
    <script>
        var _hmt = _hmt || [];
        (function() {
          var hm = document.createElement("script");
          hm.src = "https://hm.baidu.com/hm.js?32efbcb3a2bb6ca2027e0b38041445a7";
          var s = document.getElementsByTagName("script")[0];
          s.parentNode.insertBefore(hm, s);
        })();
    </script>
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <!-- 头部 -->
    <div class="layui-header">
        <div class="layui-logo">
            <img src="/static/assets/images/logo.png"/>
            <cite>&nbsp;&nbsp;Django+Layui 旗舰版&emsp;</cite>
        </div>
        <ul class="layui-nav layui-layout-left">
            <li class="layui-nav-item" lay-unselect>
                <a ew-event="flexible" title="侧边伸缩"><i class="layui-icon layui-icon-shrink-right"></i></a>
            </li>
            <li class="layui-nav-item" lay-unselect>
                <a ew-event="refresh" title="刷新"><i class="layui-icon layui-icon-refresh-3"></i></a>
            </li>
            {% for item in menuList %}
            <li class="layui-nav-item layui-hide-xs {% if forloop.counter0 == 0 %} layui-this{% endif %}" lay-unselect><a
                    nav-bind="xt{{forloop.counter0}}">{{item.name}}</a></li>
            {% endfor %}
        </ul>
        <ul class="layui-nav layui-layout-right" style="margin-right: 10px;">
            <li class="layui-nav-item layui-hide-xs" lay-unselect>
                <a ew-event="fullScreen" title="全屏"><i class="layui-icon layui-icon-screen-full"></i></a>
            </li>
            <li class="layui-nav-item" lay-unselect>
                <a>
                    <img src="{% if userInfo.avatar %}{{userInfo.avatar}}{% else %}/static/assets/images/logo.png{% endif %}" class="layui-nav-img">
                    <cite>{{userInfo.realname}}</cite>
                </a>
                <dl class="layui-nav-child">
                    <dd lay-unselect><a ew-href="/userInfo">个人中心</a></dd>
                    <dd lay-unselect><a ew-event="psw">修改密码</a></dd>
                    <hr>
                    <dd lay-unselect><a ew-event="logout" data-url="/logout">退出</a></dd>
                </dl>
            </li>
        </ul>
    </div>

    <!-- 侧边栏 -->
    <div class="layui-side">
        <div class="layui-side-scroll">
            {% for val in menuList %}
            <ul class="layui-nav layui-nav-tree {% if forloop.counter0 > 0  %}layui-hide{% endif %}" nav-id="xt{{forloop.counter0}}" lay-filter="admin-side-nav" lay-shrink="_all" style="margin: 15px 0;">
                {% for vo in val.children %}
                <li  class="layui-nav-item">
                    <a {% if vo.target == 2 %}href="{{ vo.url }}" target="_blank" {% else %}lay-href="{{ vo.url }}"{% endif %}><i class="layui-icon {{vo.icon}}"></i>&emsp;<cite>{{vo.name}}</cite></a>
                    {% if vo.children %}
                    <dl class="layui-nav-child">
                    {% for v in vo.children %}
                        {% if v.children %}
                        <dd>
                            <a>{{v.name}}</a>
                            <dl class="layui-nav-child">
                                {% for vt in v.children.items %}
                                <dd><a {% if vt.target == 2 %}href="{{vt.url}}" target="_blank" {% else %}lay-href="{{vt.url}}"{% endif %}>{{vt.name}}</a></dd>
                                {% endfor %}
                            </dl>
                        </dd>
                        {% else %}
                        <dd><a {% if v.target == 2 %}href="{{v.url}}" target="_blank" {% else %}lay-href="{{v.url}}"{% endif %}>{{v.name}}</a></dd>
                        {% endif %}
                    {% endfor %}
                    {% endif %}
                    </dl>
                </li>
                {% endfor %}
            </ul>
            {% endfor %}
        </div>
    </div>

    <!-- 主体部分 -->
    <div class="layui-body"></div>
    <!-- 底部 -->
    <div class="layui-footer layui-text">
        copyright © 2021~2023 <a href="https://www.djangoadmin.cn" target="_blank">djangoadmin.cn</a> all rights reserved.
        <span class="pull-right">版本号：v2.3.0</span>
    </div>
</div>

<!-- 加载动画 -->
<div class="page-loading">
    <div class="ball-loader">
        <span></span><span></span><span></span><span></span>
    </div>
</div>

<!-- js部分 -->
<script type="text/javascript" src="/static/assets/libs/layui/layui.js"></script>
<script type="text/javascript" src="/static/assets/js/common.js?v=318"></script>
<script>
    layui.use(['index'], function () {
        var $ = layui.jquery;
        var index = layui.index;

        // 默认加载主页
        index.loadHome({
            menuPath: '/main',
            menuName: '<i class="layui-icon layui-icon-home"></i>'
        });

    });
</script>
</body>
</html>